Skip to content

major: Add support for tag-directory-separator and use-version-prefix inputs, with workflow, config, and mock/test improvements #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Aug 21, 2025

Conversation

virgofx
Copy link
Member

@virgofx virgofx commented Jun 16, 2025

This pull request introduces a set of improvements and updates across CI workflows, documentation, and development tooling. The main changes include enhanced configuration options for the Terraform module releaser, updates to workflow actions and dependencies, and refinements to documentation for clarity and completeness.

Documentation and Configuration Improvements

  • Added new input parameters to the Terraform module releaser, including wiki-usage-template, tag-directory-separator, and use-version-prefix, and clarified descriptions for existing parameters in README.md. Also improved documentation of output variables for modules. [1] [2] [3]
  • Updated example configuration and descriptions for usage templates, filtering options, and output formats in README.md for better guidance and accuracy. [1] [2] [3] [4]

CI Workflow Updates

  • Upgraded terraform-docs-version to v0.20.0 and expanded module-path-ignore patterns in .github/workflows/ci.yml. Added support for tag-directory-separator and use-version-prefix options.
  • Updated the Super-Linter action to v8.0.0 for improved linting in .github/workflows/lint.yml.
  • Changed the SonarQube scan action to a specific commit SHA for reproducibility in .github/workflows/test.yml. Also standardized the test job name and permissions. [1] [2]
  • Updated the changelog script import path and pinned the create-pull-request action to a specific commit in .github/workflows/release-start.yml. [1] [2]

Development Environment and Tooling

  • Switched the Prettier devcontainer feature to a community-maintained version and removed SSH agent forwarding from .devcontainer/devcontainer.json for improved compatibility. [1] [2]

Test Mock Refinements

  • Updated mock implementations in __mocks__/@actions/core.ts to use unused parameter names for clarity and consistency in testing. [1] [2] [3] [4]

@virgofx virgofx marked this pull request as draft June 16, 2025 17:01
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch 5 times, most recently from 2d7550c to a43d686 Compare June 25, 2025 21:07
@virgofx virgofx mentioned this pull request Jul 11, 2025
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch 3 times, most recently from f52c0a6 to eb44238 Compare August 19, 2025 00:36
@techpivot techpivot deleted a comment from github-actions bot Aug 19, 2025
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch from 832fdd3 to 9ab9723 Compare August 19, 2025 01:17
virgofx added 18 commits August 19, 2025 01:20
- Add ACTION_INPUTS mapping for all GitHub Action inputs
- Add createConfigFromInputs() function for dynamic config creation
- Implement proper array parsing that distinguishes required vs optional
- Required array inputs throw error on empty string
- Optional array inputs return empty array on empty string
- Add comprehensive type definitions for action metadata
- Replace manual input processing with createConfigFromInputs()
- Add comprehensive validation for tag directory separator
- Add validation for default first tag format
- Simplify config initialization using metadata-driven approach
- Update config mock to use real action metadata system
- Improve error messages with more specific validation details
- Refactor input helpers to use centralized ACTION_INPUTS metadata
- Add getActionDefaults() to load defaults from action.yml
- Generate input type arrays dynamically from metadata
- Add getConfigKey() helper for type-safe config access
- Simplify setupTestInputs() to use action.yml defaults
- Remove hardcoded input arrays in favor of metadata-driven approach
- Add tests for tag directory separator validation (length and character)
- Add tests for default first tag format validation
- Add tests for required vs optional array input handling
- Add tests for array parsing edge cases and deduplication
- Improve test organization with metadata-driven approach
- Achieve 100% test coverage for config.ts validation logic
- Set up required GitHub environment variables in context tests
- Fix test isolation by properly clearing context between tests
- Ensure environment variables are set before context initialization
- Resolve test failures caused by missing GitHub Action environment
- Removed deprecated action-metadata types and utility functions.
- Introduced new metadata structure for action inputs in `metadata.ts`.
- Updated configuration handling to support dynamic input mapping.
- Enhanced tag processing to accommodate various directory separators.
- Added tests for metadata input handling and error scenarios.
- Improved regex patterns for module tag validation.
- Updated action.yml to include new input parameters for tag directory separator and version prefix usage.
- Refactored TerraformModule class to utilize new configuration settings for versioning.
… and examples for directory separator and version prefix options
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch from 7b01d87 to b60d18e Compare August 21, 2025 04:50
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch 2 times, most recently from 13aba7b to 18a8745 Compare August 21, 2025 05:45
@virgofx virgofx self-assigned this Aug 21, 2025
@virgofx virgofx added enhancement New feature or request dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Aug 21, 2025
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch 4 times, most recently from 873f4ba to 30e90a3 Compare August 21, 2025 06:05
@virgofx virgofx marked this pull request as ready for review August 21, 2025 06:07
refactor: remove redundant release content structure validation from tests

chore: update biome configuration to include all scripts

chore: add new changelog script and remove deprecated action.yml

test: add parse-modules-test script for local testing of parseTerraformModules function

feat: implement changelog generation with GitHub API integration

delete: remove unused development script for parsing modules
@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch from 30e90a3 to cc5eec2 Compare August 21, 2025 06:09
@virgofx virgofx requested review from Copilot and removed request for Copilot August 21, 2025 06:09
Copilot

This comment was marked as outdated.

@virgofx virgofx requested a review from Copilot August 21, 2025 06:27
Copilot

This comment was marked as outdated.

@virgofx virgofx force-pushed the 183-semver-pattern-without-v-prefix branch from 4aa960c to f94d31c Compare August 21, 2025 06:45
@virgofx virgofx requested a review from Copilot August 21, 2025 06:45
Copy link

📋 Release Plan

Module Type Latest
Version
New
Version
Release
Details
tf-modules-kms patch 1.0.0 🆕 Initial Release
tf-modules-vpc-endpoint patch 1.0.0 🆕 Initial Release

📝 Changelog

tf-modules-kms-1.0.0 (2025-08-21)

  • 🔀PR #227 - major: Add support for tag-directory-separator and use-version-prefix inputs, with workflow, config, and mock/test improvements

tf-modules-vpc-endpoint-1.0.0 (2025-08-21)

  • 🔀PR #227 - major: Add support for tag-directory-separator and use-version-prefix inputs, with workflow, config, and mock/test improvements

Wiki Statusℹ️

✅ Enabled

Automated Tag/Release Cleanupℹ️

⏸️ Existing tags and releases will be preserved as the delete-legacy-tags flag is disabled.

Powered by:   techpivot/terraform-module-releaser

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces comprehensive support for configurable tag directory separators and version prefixes in Terraform module releases, alongside significant refactoring of configuration management and testing infrastructure.

  • Adds tag-directory-separator and use-version-prefix inputs for flexible tagging schemes
  • Refactors configuration management with centralized metadata-driven approach
  • Consolidates template rendering functionality and improves string utilities

Reviewed Changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/wiki.ts Updates module source URL formatting and switches to new template rendering function
src/utils/string.ts Removes trimSlashes function and adds renderTemplate and removeLeadingCharacters utilities
src/utils/metadata.ts New centralized configuration metadata system for action inputs
src/utils/constants.ts Adds tag directory separator validation and improved regex patterns
src/types/metadata.types.ts New type definitions for action input metadata
src/types/index.ts Exports new metadata types
src/types/context.types.ts Updates import paths to use absolute imports
src/types/config.types.ts Adds new configuration options with detailed documentation
src/terraform-module.ts Major refactoring for flexible tag directory separators and version prefixes
src/templating.ts Removed - functionality moved to utils/string.ts
src/context.ts Updates unused parameter naming for consistency
src/config.ts Refactors to use metadata-driven configuration system
Various test files Updates tests to support new configuration system and improve coverage
action.yml Adds new input parameters and reorders for better organization
README.md Documents new configuration options and improves examples
CI/Workflow files Updates versions and configurations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@virgofx virgofx merged commit 664bdbc into main Aug 21, 2025
24 checks passed
@virgofx virgofx deleted the 183-semver-pattern-without-v-prefix branch August 21, 2025 06:48
@release-preview release-preview bot mentioned this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant